acf915b09f8678396b7bac271d0264fa53438064,plugins/devkit/src/run/IdeaLicenseHelper.java,IdeaLicenseHelper,copyIDEALicense,#String#Sdk#,77
Before Change
public static void copyIDEALicense(final String sandboxHome, Sdk jdk){
if (isIDEALicenseInSandbox(sandboxHome + File.separator + CONFIG_DIR_NAME, sandboxHome + File.separator + "system", jdk.getHomePath() + File.separator + "bin") == null){
final File ideaLicense = isIDEALicenseInSandbox(PathManager.getConfigPath(), PathManager.getSystemPath(), PathManager.getBinPath());
if (ideaLicense != null){
try {
FileUtil.copy(ideaLicense, new File(new File(sandboxHome, CONFIG_DIR_NAME), LICENSE_PATH_PREFERRED));
After Change
public static void copyIDEALicense(final String sandboxHome) {
File sandboxSystemPath = new File(sandboxHome, "system");
File systemPath = new File(PathManager.getSystemPath());
File[] runningIdeaLicenses = systemPath.listFiles(new PatternFilenameFilter("idea\\d+\\.key"));
if (runningIdeaLicenses != null) {
for (File license : runningIdeaLicenses) {
File devIdeaLicense = new File(sandboxSystemPath, license.getName());
if (!devIdeaLicense.exists()) {
try {
FileUtil.copy(license, devIdeaLicense);